package populationTypes;

import java.util.ArrayList;
import java.util.Random;

import crossingMethods.Reproductor;
import chromosomes.ArithmeticChromosome;

public class ArithmeticChromosomeNR extends ArithmeticChromosome {

	public ArithmeticChromosomeNR(int chromosomeSize,int genSize,
			double arithmeticLowerRange, double arithmeticTopRange,
			double crossingRate, Reproductor reproductor, double mutationRate) {
		super(chromosomeSize, genSize,arithmeticLowerRange, arithmeticTopRange, crossingRate,
				reproductor, mutationRate);
		this.geneStrip=new ArrayList<Integer>();
		this.initGeneStrip();
	}

	@Override
	protected void initGeneStrip() {

		for(int i=0;(i<chromosomeSize && geneStrip.size()<chromosomeSize);i++)
		{
			//todo esto para poder generar numeros aleatorios entre 2 valores 
			int Max = (int) this.arithmeticTopRange;
			int Min = (int) this.arithmeticLowerRange;
			int value = ((int)(Math.random()*(Max-Min))+Min);
			this.geneStrip.add(value);
		}
	
	}


}
